import React from 'react';
export default function FunRefTest (props) {

    const input = React.createRef();
    // let input2 = null;
  /*  useEffect(()=>{

        props.onRef2(input2)

    },[])*/

    return (
        <div>
            <div>
                函数式组件：<input ref={input} type="text"/>
            </div>
            <div>
                {/*函数式2：<input ref={(el)=> input2 = el} type="text"/>*/}
            </div>
        </div>
    )
}